<ui:composition template="../WEB-INF/templates/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:tc="http://java.sun.com/jsf/composite/components">

	<ui:define name="content-title">
		<h:outputLabel>Shops</h:outputLabel>
	</ui:define>	 
	
	<ui:define name="content">
		<p:panel header="Shops">
			<p:dataTable id="table" value="#{shopBean.shopList}" var="shop" style="font-size:13px">
			
			<f:facet name="header">
				All Shops
			</f:facet>
			
			<p:column id="shopLogoColumn" filterBy="#{shop.name}"   
	                headerText="Shop Name" style="text-align:center" >  
	            <p:graphicImage value="/resources/images/logos/chicken.gif"  height="100px" width="150px" />  
	        </p:column>
	        
	        <p:column id="shopnameColumn" filterBy="#{shop.name}"   
	                headerText="Shop Name" style="text-align:center" >  
	            <h:outputText value="#{shop.name}" />  
	        </p:column>
	        
	        <p:column id="Category" filterBy="#{shop.category}"   
	                headerText="Category" style="text-align:center">  
	            <h:outputText value="#{shop.category}" />  
	        </p:column>    
	        
						
			<p:column id="lastnameColumn" filterBy="#{shop.country}"   
	                headerText="Location" style="text-align:center">  
	            <h:outputText value="#{shop.country}" />  
	        </p:column>
	        
			<p:column id="mobileColumn" filterBy="#{shop.currency}"   
	                headerText="Trade Currency" style="text-align:center">  
	            <h:outputText value="#{user.telephoneNumber}" />  
	        </p:column>
	        
	        <p:column style="text-align:center">  
	            <p:commandButton value="View Shop" action="#{shopBean.navigateToShop(shop)}">
	            	<f:setPropertyActionListener target="#{beanStore.selectedShop}" value="#{shop}" />
	             </p:commandButton>
	        </p:column>
	        		
	        
			<f:facet name="footer">
				<h:form>
					<p:commandButton value="Create New Shop" action="#{shopBean.navigateToCreateShop}" style="font-size:13px; font-weight:bold; "/>
				</h:form>
			</f:facet>
		</p:dataTable>
		</p:panel>
	</ui:define>
	
</ui:composition>